package com.warehouse.module.business.controller.admin.cargoinfo.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.warehouse.framework.excel.core.annotations.DictFormat;
import com.warehouse.framework.excel.core.convert.DictConvert;
import com.warehouse.module.business.controller.admin.cargofile.vo.SimpleFileVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.*;
import javax.validation.constraints.*;

@Schema(description = "管理后台 - 货物资料新增/修改 Request VO")
@Data
public class CargoInfoSaveReqVO {

    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "15824")
    private Long id;

    @Schema(description = "进仓件数", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "进仓件数不能为空")
    private Long warehouseNumber;

    @Schema(description = "品名/型号（多个逗号分开）", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "品名/型号（多个逗号分开）不能为空")
    private String productNameMode;

    @Schema(description = "货物类型", requiredMode = Schema.RequiredMode.REQUIRED)
//    @NotEmpty(message = "货物类型不能为空")
    private String goodsNature;

    @Schema(description = "是否需要特殊防护(0-否；1-是)")
    private Integer specialProtection;

    @Schema(description = "是否自带危包(0-否；1-是)")
    private Integer comesDangerousBag;

    @Schema(description = "主订单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "16278")
    @NotEmpty(message = "主订单号不能为空")
    private String mainOrderId;

    @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Integer status;

    /**
     * 是否入库
     */
    @Schema(description = "是否入库", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Integer storage;

    /**
     * 分单号
     */
    @Schema(description = "分单号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private String subOrderId;

    /**
     * 目的地城市Id
     */
    @Schema(description = "目的地城市Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "目的地城市不能为空")
    private Long destinationCityId;

    /**
     * 分单城市Id
     */
    @Schema(description = "分单城市Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Long subDestCityId;

    /**
     * 客服Id
     */
    @Schema(description = "客服Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Long serviceId;

    /**
     * 授权给他人
     */
    @Schema(description = "授权给他人", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Integer serviceGrantStatus;

    /**
     * 被授权客服id
     */
    @Schema(description = "被授权客服id", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Long serviceOtherId;

    /**
     * 重量kg
     */
    @Schema(description = "重量kg", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private BigDecimal weight;

    /**
     * 体积
     */
    @Schema(description = "体积", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private BigDecimal volume;

    /**
     * 类别代码
     */
    @Schema(description = "类别代码", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private String mainCategoryCode;

    /**
     * 辅助类别代码
     */
    @Schema(description = "辅助类别代码", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private String subCategoryCode;

    /**
     * 包装备注
     */
    @Schema(description = "包装备注", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private String note;

    /**
     * 是否随机
     */
    @Schema(description = "是否随机", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Integer randomFlag;

    /**
     * 通关
     */
    @Schema(description = "通关", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private String customsClearance;

    /**
     * 地服 CA/BGS
     */
    @Schema(description = "地服 CA/BGS", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Integer theGround;

    /**
     * 公司Id
     */
    @Schema(description = "公司Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "客户公司不能为空")
    private Long companyId;

    /**
     * 主客户Id
     */
    @Schema(description = "主客户Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotNull(message = "主客户不能为空")
    private Long mainCustomerId;

    /**
     * 分通知客户id1
     */
    @Schema(description = "分通知客户id1", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Long subCustomerId1;

    /**
     * 分通知客户id2
     */
    @Schema(description = "分通知客户id2", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Long subCustomerId2;


    /**
     * 装载
     */
    private String freight;

    /**
     * rac
     */
    private Integer rac;

    /**
     * 航班号
     */
    private String flightNumber;

    /**
     * 航班时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date flightDate;

    private List<SimpleFileVO> shenbaoFiles;

    private List<SimpleFileVO> zhidanFiles;

    private List<SimpleFileVO> baoguanFiles;

    private List<SimpleFileVO> jiandingFiles;

    private List<SimpleFileVO> dgdFiles;

}